using System;
using System.Collections.Generic;
//+
namespace ESVBible.Service.Parameter
{
    /// <summary>
    /// Parameters representing the queryInfo function, providing parsing and display information about your query, including identify whether it is a passage reference or a word search.
    /// </summary>
    public class QueryInfoParameter : Parameter, IDefaultOptimization
    {
        private String q;

        //+
        //- @Q -//
        /// <summary>
        /// The words or passage you want to parse.
        /// </summary>
        public String Q
        {
            get
            {
                if (String.IsNullOrEmpty(q))
                {
                    throw new ESVBibleException("Q (the words or passage you want to parse) is required");
                }
                //+
                return q;
            }
            set
            {
                q = value;
            }
        }

        //+
        //- @QueryInfoParameters -//
        public QueryInfoParameter() { }

        //+
        //- $IDefaultOptimization.GetSettingsList -//
        Dictionary<String, String> IDefaultOptimization.GetSettingsList()
        {
            Dictionary<String, String> d = new Dictionary<String, String>();
            //+
            if (String.IsNullOrEmpty(this.Q)) ArgumentListManager.AddArgument(d, "q", this.Q);
            //+
            return d;
        }
    }
}